decorative banner

Using the ".name" attribute


    After Effects 5.5 adds the expression ".name" to Comp, Footage, Layer, Mask, and Effect objects. This is useful when you want to apply the same expression to several layers, varying the behavior based on the name of an object. For example, the following expression wiggles the position of a layer differently depending on whether or not the layer is named "hero":

    amp = 20;

    if (name == "hero") {

        amp = 40;

    }

    wiggle(5, amp)